home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 4: Demo 1 / almathera_demo1.bin / amos / 64 colours.amos / 64 colours.amosSourceCode
AMOS Source Code  |  1995-03-16  |  9KB  |  263 lines

  1. Screen Open 2,350,300,64,Lowres
  2. Screen Display 2,118,40,350,300
  3. Limit Mouse 118,40 To 450,300
  4. Curs Off : Flash Off 
  5. Cls 0 : Pen(1) : Paper 0
  6. Colour 0,$0 : Colour 1,$FFF : Colour 2,$DC8 : Colour 3,$ED5
  7. Colour 4,$DCB : Colour 5,$DC8 : Colour 6,$88F : Colour 7,$AAF
  8. Colour 8,$CCF : Colour 9,$DDF : Colour 10,$EEF : Colour 11,$80
  9. Colour 12,$A0 : Colour 13,$C0 : Colour 14,$E0 : Colour 15,$F0
  10. Colour 16,$F00 : Colour 17,$F45 : Colour 18,$F88 : Colour 19,$FBB
  11. Colour 20,$F8F : Colour 21,$FAF : Colour 22,$FBF : Colour 23,$FCF
  12. Colour 24,$FF0 : Colour 25,$DD0 : Colour 26,$888 : Colour 27,$AAA
  13. Colour 28,$BBB : Colour 29,$CCC : Colour 30,$DDD : Colour 31,$EEE
  14. Pen 1 : Paper 0
  15. Locate 1,2 : Centre "INSTRUCTIONS"
  16. Locate 2,4 : Print "Select colour from menu and press on"
  17. Locate 2,5 : Print "colour you want to alter."
  18. Locate 2,6 : Print "Use sliders to change the colour and"
  19. Locate 2,7 : Print "when satisfied press on exit."
  20. Locate 2,9 : Print "You can only alter colours up to 31."
  21. Locate 2,10 : Print "Colours above 31 are automatically "
  22. Locate 2,11 : Print "altered when colours below 31 are"
  23. Locate 2,12 : Print "altered."
  24. Locate 2,13 : Print "E.G.To alter colour 34 simply alter"
  25. Locate 2,14 : Print "colour 2 and both 2 and 34 will be"
  26. Locate 2,15 : Print "changed."
  27. Locate 2,17 : Print "To Exit from any slider press"
  28. Locate 2,18 : Print "outside the slider Box"
  29. Locate 2,28 : Input "PRESS RETURN TO CONTINUE";A$
  30. Cls 0
  31. Ink 0 : Bar 0,8 To 26,28 : Ink 1 : Bar 30,8 To 56,28
  32. Ink 2 : Bar 60,8 To 86,28 : Ink 3 : Bar 90,8 To 116,28
  33. Ink 4 : Bar 120,8 To 146,28 : Ink 5 : Bar 150,8 To 176,28
  34. Ink 6 : Bar 180,8 To 206,28 : Ink 7 : Bar 210,8 To 236,28
  35. Ink 8 : Bar 240,8 To 266,28 : Ink 9 : Bar 270,8 To 296,28
  36. Ink 10 : Bar 300,8 To 326,28
  37. Locate 2,4 : Print "0  1   2   3   4  5   6   7   8   9  10 "
  38. Ink 11 : Bar 0,41 To 26,61 : Ink 12 : Bar 30,41 To 56,61
  39. Ink 13 : Bar 60,41 To 86,61 : Ink 14 : Bar 90,41 To 116,61
  40. Ink 15 : Bar 120,41 To 146,61 : Ink 16 : Bar 150,41 To 176,61
  41. Ink 17 : Bar 180,41 To 206,61 : Ink 18 : Bar 210,41 To 236,61
  42. Ink 19 : Bar 240,41 To 266,61 : Ink 20 : Bar 270,41 To 296,61
  43. Ink 21 : Bar 300,41 To 326,61
  44. Locate 1,8 : Print "11 12  13  14  15  16 17  18  19  20  21"
  45. Ink 22 : Bar 0,74 To 26,94 : Ink 23 : Bar 30,74 To 56,94
  46. Ink 24 : Bar 60,74 To 86,94 : Ink 25 : Bar 90,74 To 116,94
  47. Ink 26 : Bar 120,74 To 146,94 : Ink 27 : Bar 150,74 To 176,94
  48. Ink 28 : Bar 180,74 To 206,94 : Ink 29 : Bar 210,74 To 236,94
  49. Ink 30 : Bar 240,74 To 266,94 : Ink 31 : Bar 270,74 To 296,94
  50. Ink 32 : Bar 300,74 To 326,94
  51. Locate 1,12 : Print "22 23  24  25  26  27 28  29  30  31  32"
  52. Ink 33 : Bar 0,104 To 26,124 : Ink 34 : Bar 30,104 To 56,124
  53. Ink 35 : Bar 60,104 To 86,124 : Ink 36 : Bar 90,104 To 116,124
  54. Ink 37 : Bar 120,104 To 146,124 : Ink 38 : Bar 150,104 To 176,124
  55. Ink 39 : Bar 180,104 To 206,124 : Ink 40 : Bar 210,104 To 236,124
  56. Ink 41 : Bar 240,104 To 266,124 : Ink 42 : Bar 270,104 To 296,124
  57. Ink 43 : Bar 300,104 To 326,124
  58. Locate 1,16 : Print "33 34  35  36  37  38 39  40  41  42  43"
  59. Ink 44 : Bar 0,136 To 26,156 : Ink 45 : Bar 30,136 To 56,156
  60. Ink 46 : Bar 60,136 To 86,156 : Ink 47 : Bar 90,136 To 116,156
  61. Ink 48 : Bar 120,136 To 146,156 : Ink 49 : Bar 150,136 To 176,156
  62. Ink 50 : Bar 180,136 To 206,156 : Ink 51 : Bar 210,136 To 236,156
  63. Ink 52 : Bar 240,136 To 266,156 : Ink 53 : Bar 270,136 To 296,156
  64. Ink 54 : Bar 300,136 To 326,156
  65. Locate 1,20 : Print "44 45  46  47  48  49 50  51  52  53  54"
  66. Ink 55 : Bar 0,168 To 26,188 : Ink 56 : Bar 30,167 To 56,188
  67. Ink 57 : Bar 60,168 To 86,188 : Ink 58 : Bar 90,168 To 116,188
  68. Ink 59 : Bar 120,168 To 146,188 : Ink 60 : Bar 150,168 To 176,188
  69. Ink 61 : Bar 180,168 To 206,188 : Ink 62 : Bar 210,168 To 236,188
  70. Ink 63 : Bar 240,168 To 266,188
  71. Locate 1,24 : Print "55 56  57  58  59  60 61  62  63"
  72. Ink 1 : Box 10,220 To 100,230 : Ink 1 : Box 102,220 To 192,230
  73. Ink 1 : Box 194,220 To 284,230
  74. Ink 1 : Box 300,220 To 320,230
  75. Locate 37,26 : Print "Exit"
  76. Locate 5,29 : Print "Red"
  77. Locate 16,29 : Print "Green"
  78. Locate 28,29 : Print "Blue"
  79. ST:
  80. Menu$(1)="Select"
  81. Menu$(1,1)="Colour"
  82. Menu$(1,2)=" "
  83. Menu$(1,3)="Quit"
  84. On Menu Proc TITLE1
  85. On Menu On 
  86. Menu On 
  87. Wait Key 
  88. Procedure TITLE1
  89. On Choice(2) Gosub CO,,ED
  90. On Menu On 
  91. End Proc
  92. ED:
  93. Cls 0
  94. Edit 
  95. Return 
  96. CO:
  97. While Mouse Key=0 : Wend 
  98. X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
  99. If X>300 and Y>220 and Y<230 Then Goto SQ
  100. Locate 1,26 : Print Space$(20)
  101. Locate 1,26 : Print "Colour";C
  102. Locate 10,26 : Print ",$"
  103. Gosub DK : Gosub CH
  104. Goto CO
  105. SQ:
  106. Ink 0 : Bar 300,220 To 320,230
  107. Wait 10
  108. Ink 1 : Bar 300,220 To 320,230
  109. Goto ST
  110. SA:
  111. Ink 0 : Bar 300,220 To 320,230
  112. Wait 10
  113. Ink 1 : Bar 300,220 To 320,230
  114. Goto ST
  115. DK:
  116. If X>0 and X<27 and Y>7 and Y<27 Then C=0
  117. If X>30 and X<56 and Y>7 and Y<27 Then C=1
  118. If X>60 and X<86 and Y>7 and Y<27 Then C=2
  119. If X>90 and X<116 and Y>7 and Y<27 Then C=3
  120. If X>120 and X<146 and Y>7 and Y<27 Then C=4
  121. If X>150 and X<176 and Y>7 and Y<27 Then C=5
  122. If X>180 and X<206 and Y>7 and Y<27 Then C=6
  123. If X>210 and X<236 and Y>7 and Y<27 Then C=7
  124. If X>240 and X<266 and Y>7 and Y<27 Then C=8
  125. If X>270 and X<296 and Y>7 and Y<27 Then C=9
  126. If X>300 and X<326 and Y>7 and Y<27 Then C=10
  127. If X>0 and X<27 and Y>40 and Y<60 Then C=11
  128. If X>30 and X<56 and Y>40 and Y<60 Then C=12
  129. If X>60 and X<86 and Y>40 and Y<60 Then C=13
  130. If X>90 and X<116 and Y>40 and Y<60 Then C=14
  131. If X>120 and X<146 and Y>40 and Y<60 Then C=15
  132. If X>150 and X<176 and Y>40 and Y<60 Then C=16
  133. If X>180 and X<206 and Y>40 and Y<60 Then C=17
  134. If X>210 and X<236 and Y>40 and Y<60 Then C=18
  135. If X>240 and X<266 and Y>40 and Y<60 Then C=19
  136. If X>270 and X<296 and Y>40 and Y<60 Then C=20
  137. If X>300 and X<326 and Y>40 and Y<60 Then C=21
  138. If X>0 and X<27 and Y>74 and Y<94 Then C=22
  139. If X>30 and X<56 and Y>74 and Y<94 Then C=23
  140. If X>60 and X<86 and Y>74 and Y<94 Then C=24
  141. If X>90 and X<116 and Y>74 and Y<94 Then C=25
  142. If X>120 and X<146 and Y>74 and Y<94 Then C=26
  143. If X>150 and X<176 and Y>74 and Y<94 Then C=27
  144. If X>180 and X<206 and Y>74 and Y<94 Then C=28
  145. If X>210 and X<236 and Y>74 and Y<94 Then C=29
  146. If X>240 and X<266 and Y>74 and Y<94 Then C=30
  147. If X>270 and X<296 and Y>74 and Y<94 Then C=31
  148. If Y>94 Then Goto CO
  149. Locate 1,26 : Print Space$(20)
  150. Locate 1,26 : Print "Colour";C
  151. Locate 10,26 : Print ",$"
  152. Return 
  153. CH:
  154. While Mouse Key=0 : Wend 
  155. X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
  156. If X>10 and X<100 and Y>220 and Y<230 Then Goto R1
  157. If X>102 and X<192 and Y>220 and Y<230 Then Goto G1
  158. If X>194 and X<284 and Y>220 and Y<230 Then Goto B1
  159. If X>300 and Y>220 and Y<230 Then Goto SQ
  160. Goto CH
  161. R1:
  162. While Mouse Key=0 : Wend 
  163. X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
  164. If Y<220 Then Goto CH
  165. If Y>230 Then Goto CH
  166. If X<20 Then Goto R1
  167. If X>92 Then Goto G1
  168. Ink 0 : Bar 12,221 To X,229
  169. Wait 5
  170. Ink 1 : Bar X,221 To X+2,229
  171. Wait 5
  172. Ink 0 : Bar X+2,221 To 95,229
  173. X1=(93-X)/5
  174. Gosub HR
  175. Colour(C),R+G+B
  176. Goto R1
  177. G1:
  178. While Mouse Key=0 : Wend 
  179. X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
  180. If Y<220 Then Goto CH
  181. If X<105 Then Goto G1
  182. If X>185 Then Goto B1
  183. If Y>230 Then Goto CH
  184. Ink 0 : Bar 102,221 To X,229
  185. Wait 5
  186. Ink 1 : Bar X,221 To X+2,229
  187. Wait 5
  188. Ink 0 : Bar X+2,221 To 190,229
  189. X2=(185-X)/5
  190. Gosub HG
  191. Colour(C),R+G+B
  192. Goto G1
  193. B1:
  194. While Mouse Key=0 : Wend 
  195. X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
  196. If Y<220 Then Goto CH
  197. If X<200 Then Goto B1
  198. If X>275 Then Goto B1
  199. If Y>230 Then Goto CH
  200. Ink 0 : Bar 198,221 To X,229
  201. Wait 5
  202. Ink 1 : Bar X,221 To X+2,229
  203. Wait 5
  204. Ink 0 : Bar X+2,221 To 280,229
  205. X3=(275-X)/5
  206. Gosub HB
  207. Colour(C),R+G+B
  208. Goto B1
  209. Return 
  210. HR:
  211. If X1=0 Then R=$0 : R$="0"
  212. If X1=1 Then R=$100 : R$="1"
  213. If X1=2 Then R=$200 : R$="2"
  214. If X1=3 Then R=$300 : R$="3"
  215. If X1=4 Then R=$400 : R$="4"
  216. If X1=5 Then R=$500 : R$="5"
  217. If X1=6 Then R=$600 : R$="6"
  218. If X1=7 Then R=$700 : R$="7"
  219. If X1=8 Then R=$800 : R$="8"
  220. If X1=9 Then R=$A00 : R$="A"
  221. If X1=10 Then R=$B00 : R$="B"
  222. If X1=11 Then R=$C00 : R$="C"
  223. If X1=12 Then R=$D00 : R$="D"
  224. If X1=13 Then R=$E00 : R$="E"
  225. If X1=14 Then R=$F00 : R$="F"
  226. Locate 12,26 : Print R$
  227. Return 
  228. HG:
  229. If X2=0 Then G=$0 : G$="0"
  230. If X2=1 Then G=$10 : G$="1"
  231. If X2=2 Then G=$20 : G$="2"
  232. If X2=3 Then G=$30 : G$="3"
  233. If X2=4 Then G=$40 : G$="4"
  234. If X2=5 Then G=$50 : G$="5"
  235. If X2=6 Then G=$60 : G$="6"
  236. If X2=7 Then G=$70 : G$="7"
  237. If X2=8 Then G=$80 : G$="8"
  238. If X2=9 Then G=$A0 : G$="A"
  239. If X2=10 Then G=$B0 : G$="B"
  240. If X2=11 Then G=$C0 : G$="C"
  241. If X2=12 Then G=$D0 : G$="D"
  242. If X2=13 Then G=$E0 : G$="E"
  243. If X2=14 Then G=$F0 : G$="F"
  244. Locate 13,26 : Print G$
  245. Return 
  246. HB:
  247. If X3=0 Then B=$0 : B$="0"
  248. If X3=1 Then B=$1 : B$="1"
  249. If X3=2 Then B=$2 : B$="2"
  250. If X3=3 Then B=$3 : B$="3"
  251. If X3=4 Then B=$4 : B$="4"
  252. If X3=5 Then B=$5 : B$="5"
  253. If X3=6 Then B=$6 : B$="6"
  254. If X3=7 Then B=$7 : B$="7"
  255. If X3=8 Then B=$8 : B$="8"
  256. If X3=9 Then B=$A : B$="A"
  257. If X3=10 Then B=$B : B$="B"
  258. If X3=11 Then B=$C : B$="C"
  259. If X3=12 Then B=$D : B$="D"
  260. If X3=13 Then B=$E : B$="E"
  261. If X3=14 Then B=$F : B$="F"
  262. Locate 14,26 : Print B$
  263. Return